import request from '@/utils/request'

// 查询ad列表
export function list(pageSize,pageNum) {
    const data = {
        pageSize,
        pageNum,
    }
    return request({
      url: '/goods/advertising/list',
      method: 'get',
      params: data
    })
  }

// 新增ad
export function add(data) {
  
    return request({
      url: '/goods/advertising',
      method: 'post',
      params: data
    })
  }
  // 删除ad
export function del(id) {
    return request({
      url: '/goods/advertising/'+id,
      method: 'DELETE',
    })
  }
// 修改ad
export function update(data) {

    return request({
        url: '/goods/advertising',
        method: 'put',
        params: data
    })
    }
   // 查询ad详情
export function ad(id) {
    return request({
      url: '/goods/advertising/'+id,
      method: 'get',
    })
  }